\documentclass[CJK]{ctexart}

\usepackage{fontspec}
\usepackage{amsmath}
\usepackage[hmargin=1.25in,vmargin=1in]{geometry}

\begin{document}
\title{程序说明}
\date{}
\maketitle


\section{程序结构}

\begin{table}[htbp]
\begin{tabular}{|l|l|}
\hline
\textbf{data\_in}  & 放置输入初始数据文件RHO,U,P,config的文件夹\\
\hline
\textbf{data\_out} & 放置输出计算过程中RHO,U,P,E和拉式坐标X变化结果的文件夹\\
\hline
\textbf{tools}     & 一些小工具\\
\hline
\textbf{file\_io}  & 数据文件读入与读出的程序\\
\hline
\textbf{Riemann\_solver} & 精确Riemann解法器\\
\hline
\textbf{finite\_volume}  & 有限格式的算法程序\\
\hline
\textbf{inter\_process}   & 有限格式中间过程的算法程序\\
\hline
\textbf{include}         & 程序的所有头文件\\
\hline
\textbf{hydrocode/hydrocode.c} & 主程序\\
\hline
\textbf{hydrocode/make.sh}     & 编译和运行程序的脚本\\
\hline
\end{tabular}
\end{table}

在Linux终端下运行make.sh即可使用gcc编译程序, 使用MATLAB/Octave软件画图.

具体如何查看程序的使用指南, 请参考README.md中的介绍.


\section{数值格式}

精确Riemann解法器根据【1】或者【2】(Appendix C)所写.

\subsection{拉格朗日格式}

向前Euler格式 [GRP/Gdounov\_solver\_LAG\_source()]:
\begin{align*}
& m_i(1/\rho_i^{n+1}-1/\rho_i^{n})-\Delta t(u_{i+1/2}^{n+1/2}-u_{i-1/2}^{n+1/2})=0,\\
& m_i(u_i^{n+1}-u_i^{n})+\Delta t(p_{i+1/2}^{n+1/2}-p_{i-1/2}^{n+1/2})=0,\\
& m_i(e_i^{n+1}-e_i^{n})+\Delta t(p_{i+1/2}^{n+1/2} u_{i+1/2}^{n+1/2}-p_{i-1/2}^{n+1/2} u_{i-1/2}^{n+1/2})=0.
\end{align*}
接触间断的位置计算:
$$
x_{i+1/2}^{n+1}=x_{i+1/2}^{n}+\Delta t u_{i+1/2}^{n+1/2}.
$$
网格节点$i+1/2$处的平均数值通量:
\begin{align*}
& u_{i+1/2}^{n+1/2}=u_{i+1/2}^{*,n}+\frac{\Delta t}{2}\left(\frac{D u}{D t}\right)_{i+1/2}^{n}, \\
& p_{i+1/2}^{n+1/2}=p_{i+1/2}^{*,n}+\frac{\Delta t}{2}\left(\frac{D p}{D t}\right)_{i+1/2}^{n}.
\end{align*}
其中$u^{*},p^{*}$为Rienmann问题中$*$区域内的解.

\begin{itemize}
\item 拉式Gdounov格式 [Gdounov\_solver\_LAG\_source()]
$$
\left(\frac{D u}{D t}\right)_{i+1/2}^{n}=0, \quad \left(\frac{D p}{D t}\right)_{i+1/2}^{n}=0
$$. 

\item 拉式GRP格式 [GRP\_solver\_LAG\_source()]

通过斜率限制器重构得到的斜率求出接触间断处的物质导数, 由GRP解法器 [linear\_GRP\_solver\_LAG()] 计算出时间导数, 通过完全显式向前Euler格式更新, 再计算出斜率.
\end{itemize}


\section{数值算例}

【2】

\subsection*{6.1 Sod's shock tube problem}

\subsection*{6.2.1 Shock-Contact Interaction}

\subsection*{6.2.3 Shock-CRW Interaction}

【3】

\subsection*{9.1(a) Sod problem}

\subsection*{9.1(b) Nearly stationary shock}

\subsection*{9.1(d) Interacting blast wave problem}

\subsection*{9.1(e) Low density and internal energy Riemann problem}


【4】

\subsection*{4.2 Almost stationary shock}

\subsection*{4.3 The double-shock problem}

\subsection*{4.4 The low-density problem}

\subsection*{4.5 The Noh shock reflection problem}


\section*{References}

\begin{itemize}
\item[【1】] E. F. Toro, A Fast Riemann Solver with Constant Covolume Applied to the Random Choice Method. Int. J. Numer. Meth. Fluids, 9:1145–1164, 1989.

\item[【2】] M. Ben-Artzi \& J. Falcovitz, "Generalized Riemann problems in computational fluid dynamics", Cambridge University Press, 2003.

\item[【3】] M. Ben-Artzi, J. Li \& G. Warnecke, A direct Eulerian GRP scheme for compressible fluid flows, Journal of Computational Physics, 218.1: 19-43, 2006.

\item[【4】] J. Li, B. Tian \& S. Wang, Dissipation matrix and artificial heat conduction for Godunov-type schemes of compressible fluid flows, Int. J. Numer. Meth. Fluids, 84: 57-75, 2017.
\end{itemize}

\end{document}
